<?php

class SearchPagesResource extends Resource
{
    const ID = "pages/search_pages";
    
    public function GetId()
    {
        return self::ID;
    }

    public function GetFreshData()
    {
        $search_pages = array();
        $pages = $this->resourceManager->GetPages();
        if ( !empty($pages) )
        {
            foreach ( $pages as $page )
            {
                if ( $page->search )
                {
                    $search_pages[] = $page->id;
                }
            }
        }
        return $search_pages;
    }
}

?>
